Many of the other scope functions simply "remix" the features of let() and apply() in slightly different combinations.

run(), for example:

  • Works like apply(), in that you use this to refer to the object

  • Works like let(), in that it returns the result of the lambda expression

Here, ultimateStuff is no longer an IntPropertyBag, but instead is a String, specifically the value that we get from calling toString() on the IntPropertyBag that we called run() on.

You can learn more about this in:
Run Edit